3.12.20 \(\int \frac {(d+e x^2) (a+b \arctan (c x))}{x^3} \, dx\) [1120]

3.12.20.1 Optimal result
3.12.20.2 Mathematica [C] (verified)
3.12.20.3 Rubi [A] (verified)
3.12.20.4 Maple [B] (verified)
3.12.20.5 Fricas [F]
3.12.20.6 Sympy [F]
3.12.20.7 Maxima [F]
3.12.20.8 Giac [F]
3.12.20.9 Mupad [B] (verification not implemented)

3.12.20.1 Optimal result

Integrand size = 19, antiderivative size = 77 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=-\frac {b c d}{2 x}-\frac {1}{2} b c^2 d \arctan (c x)-\frac {d (a+b \arctan (c x))}{2 x^2}+a e \log (x)+\frac {1}{2} i b e \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \operatorname {PolyLog}(2,i c x) \]

output
-1/2*b*c*d/x-1/2*b*c^2*d*arctan(c*x)-1/2*d*(a+b*arctan(c*x))/x^2+a*e*ln(x) 
+1/2*I*b*e*polylog(2,-I*c*x)-1/2*I*b*e*polylog(2,I*c*x)
 
3.12.20.2 Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 0.01 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.12 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=-\frac {a d}{2 x^2}-\frac {b d \arctan (c x)}{2 x^2}-\frac {b c d \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-c^2 x^2\right )}{2 x}+a e \log (x)+\frac {1}{2} i b e \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \operatorname {PolyLog}(2,i c x) \]

input
Integrate[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^3,x]
 
output
-1/2*(a*d)/x^2 - (b*d*ArcTan[c*x])/(2*x^2) - (b*c*d*Hypergeometric2F1[-1/2 
, 1, 1/2, -(c^2*x^2)])/(2*x) + a*e*Log[x] + (I/2)*b*e*PolyLog[2, (-I)*c*x] 
 - (I/2)*b*e*PolyLog[2, I*c*x]
 
3.12.20.3 Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {5515, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx\)

\(\Big \downarrow \) 5515

\(\displaystyle \int \left (\frac {d (a+b \arctan (c x))}{x^3}+\frac {e (a+b \arctan (c x))}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d (a+b \arctan (c x))}{2 x^2}+a e \log (x)-\frac {1}{2} b c^2 d \arctan (c x)-\frac {b c d}{2 x}+\frac {1}{2} i b e \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b e \operatorname {PolyLog}(2,i c x)\)

input
Int[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^3,x]
 
output
-1/2*(b*c*d)/x - (b*c^2*d*ArcTan[c*x])/2 - (d*(a + b*ArcTan[c*x]))/(2*x^2) 
 + a*e*Log[x] + (I/2)*b*e*PolyLog[2, (-I)*c*x] - (I/2)*b*e*PolyLog[2, I*c* 
x]
 

3.12.20.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5515
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*ArcTan[c*x] 
)^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d 
, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || 
 IntegerQ[m])
 
3.12.20.4 Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (63 ) = 126\).

Time = 0.18 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.68

method result size
derivativedivides \(c^{2} \left (\frac {a e \ln \left (c x \right )}{c^{2}}-\frac {a d}{2 c^{2} x^{2}}+\frac {b \left (\arctan \left (c x \right ) e \ln \left (c x \right )-\frac {\arctan \left (c x \right ) d}{2 x^{2}}+\frac {i e \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i e \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i e \operatorname {dilog}\left (-i c x +1\right )}{2}+\frac {d \,c^{2} \left (-\frac {1}{c x}-\arctan \left (c x \right )\right )}{2}\right )}{c^{2}}\right )\) \(129\)
default \(c^{2} \left (\frac {a e \ln \left (c x \right )}{c^{2}}-\frac {a d}{2 c^{2} x^{2}}+\frac {b \left (\arctan \left (c x \right ) e \ln \left (c x \right )-\frac {\arctan \left (c x \right ) d}{2 x^{2}}+\frac {i e \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i e \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i e \operatorname {dilog}\left (-i c x +1\right )}{2}+\frac {d \,c^{2} \left (-\frac {1}{c x}-\arctan \left (c x \right )\right )}{2}\right )}{c^{2}}\right )\) \(129\)
parts \(a e \ln \left (x \right )-\frac {a d}{2 x^{2}}+b \,c^{2} \left (\frac {\arctan \left (c x \right ) \ln \left (c x \right ) e}{c^{2}}-\frac {\arctan \left (c x \right ) d}{2 c^{2} x^{2}}-\frac {-i e \ln \left (c x \right ) \ln \left (i c x +1\right )+i e \ln \left (c x \right ) \ln \left (-i c x +1\right )-i e \operatorname {dilog}\left (i c x +1\right )+i e \operatorname {dilog}\left (-i c x +1\right )-d \,c^{2} \left (-\frac {1}{c x}-\arctan \left (c x \right )\right )}{2 c^{2}}\right )\) \(129\)
risch \(-\frac {i b e \operatorname {dilog}\left (-i c x +1\right )}{2}+\frac {i c^{2} b d \ln \left (-i c x \right )}{4}-\frac {b c d}{2 x}-\frac {i c^{2} b d \ln \left (c^{2} x^{2}+1\right )}{8}-\frac {b \,c^{2} d \arctan \left (c x \right )}{4}-\frac {i b d \ln \left (-i c x +1\right )}{4 x^{2}}+a e \ln \left (-i c x \right )-\frac {a d}{2 x^{2}}+\frac {i b e \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i b \,c^{2} d \ln \left (i c x \right )}{4}+\frac {i b \,c^{2} d \ln \left (i c x +1\right )}{4}+\frac {i b d \ln \left (i c x +1\right )}{4 x^{2}}\) \(157\)

input
int((e*x^2+d)*(a+b*arctan(c*x))/x^3,x,method=_RETURNVERBOSE)
 
output
c^2*(a/c^2*e*ln(c*x)-1/2*a*d/c^2/x^2+b/c^2*(arctan(c*x)*e*ln(c*x)-1/2*arct 
an(c*x)*d/x^2+1/2*I*e*ln(c*x)*ln(1+I*c*x)-1/2*I*e*ln(c*x)*ln(1-I*c*x)+1/2* 
I*e*dilog(1+I*c*x)-1/2*I*e*dilog(1-I*c*x)+1/2*d*c^2*(-1/c/x-arctan(c*x))))
 
3.12.20.5 Fricas [F]

\[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \]

input
integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="fricas")
 
output
integral((a*e*x^2 + a*d + (b*e*x^2 + b*d)*arctan(c*x))/x^3, x)
 
3.12.20.6 Sympy [F]

\[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=\int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e x^{2}\right )}{x^{3}}\, dx \]

input
integrate((e*x**2+d)*(a+b*atan(c*x))/x**3,x)
 
output
Integral((a + b*atan(c*x))*(d + e*x**2)/x**3, x)
 
3.12.20.7 Maxima [F]

\[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \]

input
integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="maxima")
 
output
-1/2*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x^2)*b*d + b*e*integrate(arcta 
n(c*x)/x, x) + a*e*log(x) - 1/2*a*d/x^2
 
3.12.20.8 Giac [F]

\[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (e x^{2} + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \]

input
integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="giac")
 
output
sage0*x
 
3.12.20.9 Mupad [B] (verification not implemented)

Time = 0.85 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.18 \[ \int \frac {\left (d+e x^2\right ) (a+b \arctan (c x))}{x^3} \, dx=\left \{\begin {array}{cl} a\,e\,\ln \left (x\right )-\frac {a\,d}{2\,x^2} & \text {\ if\ \ }c=0\\ a\,e\,\ln \left (x\right )-\frac {a\,d}{2\,x^2}-\frac {b\,d\,\mathrm {atan}\left (c\,x\right )}{2\,x^2}-\frac {b\,d\,\left (c^3\,\mathrm {atan}\left (c\,x\right )+\frac {c^2}{x}\right )}{2\,c}-\frac {b\,e\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

input
int(((a + b*atan(c*x))*(d + e*x^2))/x^3,x)
 
output
piecewise(c == 0, a*e*log(x) - (a*d)/(2*x^2), c ~= 0, a*e*log(x) - (b*e*(d 
ilog(- c*x*1i + 1) - dilog(c*x*1i + 1))*1i)/2 - (a*d)/(2*x^2) - (b*d*atan( 
c*x))/(2*x^2) - (b*d*(c^3*atan(c*x) + c^2/x))/(2*c))